https://glot.io/snippets/gfte3dqr3y/raw/main.lua